import { amapAPI } from "../../../utils/request.js" 

// 详情  socketCode
const findEquipment = config =>
  amapAPI.post('/api/socket/find', config)

// 启动充电  socketCode
const startDevice = config =>
  amapAPI.post('/api/order/startDevice', config)

// 停止充电  outTradeId
const stopDevice = config =>
  amapAPI.post('/api/order/stopDevice', config)

// 取消预约充电  socketCode
const cancelSchedule = config =>
  amapAPI.post('/api/order/cancelSchedule', config)

// 开始预约充电  socketCode startTime endTime
const scheduleStart = config =>
  amapAPI.post('/api/order/scheduleStart', config)

// 查看订单状态  outTradeId
const queryOrderStatus = config =>
  amapAPI.post('/api/order/queryOrderStatus', config)

// 查看订单过程数据  outTradeId
const queryOrderProcess = config =>
  amapAPI.post('/api/order/queryOrderProcess', config)


export {
  findEquipment,
  startDevice,
  stopDevice,
  cancelSchedule,
  scheduleStart,
  queryOrderStatus,
  queryOrderProcess
}